.choose-by-tags {
  display: flex;
  flex-direction: column;
  height: 50vh;
  position: relative;
}

.loading-mask {
  position: absolute;
  top: -6px;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0;
  background-color: rgba(#fff, 0.5);
  z-index: 1;
}

// ==========================================

.no-tags {
  margin-top: 180px;
}

.choose-by-tags > header {
  padding: 0 12px;
}

.tags-row,
.search-row {
  display: flex;
  padding-bottom: 16px;
  label {
    color: #777;
    margin-right: 12px;
    flex-shrink: 0;
    font-size: 12px;
  }
}

.tags-row {
  & > label {
    padding-top: 4px;
  }
  & > div {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    row-gap: 10px;
  }
  :global(.ant-tag) {
    align-items: center;
    cursor: pointer;
    display: flex;
    padding: 2px 8px;
    position: relative;
    user-select: none;
  }
  .count {
    background-color: lighten(#f5222d, 10%);
    border-radius: 100px;
    color: #fff;
    font-size: 12px;
    left: -9px;
    min-width: 1em;
    padding: 0 0.5em;
    position: absolute;
    text-align: center;
    top: -10px;
    transform: scale(0.75);
    transition: background-color 0.2s ease-in;
  }
  :global(.ant-tag-blue) .count {
    background-color: lighten(#096dd9, 15%);
  }
  :global(.ant-btn-link) {
    height: 1em;
    line-height: 1em;
    padding: 0 6px;
  }
}

.search-row {
  align-items: center;
  :global(.ant-select) {
    width: 220px;
    margin-left: 12px;
    flex-shrink: 0;
  }
}

// ==========================================

.choose-by-tags > main {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.empty {
  margin-top: 100px;
}

.contacts-wrapper {
  flex: 1;
}

.contacts-header,
.contact-row {
  align-items: center;
  display: flex;
  .choose {
    text-align: center;
    width: 60px;
  }
  .contact {
    margin-right: 16px;
    width: 300px;
  }
  .qywx {
    flex: 1;
  }
}

.contacts-header {
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 12px;
}

.contact-row {
  cursor: pointer;
  transition: background-color 0.2s ease-in;
  &:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
  }
  &:hover {
    background-color: #fafafa;
  }
  .contact .name,
  .qywx {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .contact {
    align-items: center;
    display: flex;
    img {
      border-radius: 2px;
      height: 45px;
      margin-right: 12px;
      width: 45px;
    }
  }
  .qywx {
    flex: 1;
  }
}
